import { createApp } from "vue";
import App from "@/App.vue";
// 路由
import { setupRouter } from "./router";
import "@/router/intercept.ts";
// 引入状态管理
import { setupStore } from "@/store";
// svg 插件
import "virtual:svg-icons-register";
// 引入element-plus样式
import "element-plus/dist/index.css";
// 导入Element Plus图标
// import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 创建实例
const setupAll = async () => {
  const app = createApp(App);
  // // 注册Element Plus图标
  // for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  //   app.component(key, component);
  // }
  // 注册路由
  setupRouter(app);
  // 状态管理
  setupStore(app);
  // 挂载根实例
  app.mount("#app");
};
setupAll();
